import 'package:flutter/material.dart';

class TestSlidePage extends StatelessWidget {

  List tempTitle = ['数据11','数据22','数据33','数据44','数据55','数据66','数据77','数据88','数据99'];



  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('页面左右滑动'),
      ),
      body: PageView.builder(
        itemCount: tempTitle.length,
          itemBuilder: (context,index) {
            return _itemWidget(index);
          }
      ),
    );
  }

  Widget _itemWidget(index) {
    return Container(
      alignment: Alignment.centerLeft,
      width: 320,
      height: 620,
      child: Center(
        child: Text('页面${index}',textAlign: TextAlign.center,),
      ),
    );
  }

}
